<template>
  <view>
    <!-- 导航组件跳转 -->
    <navigator url="/pages/cardViewPage/cardViewPage/cardViewPage" open-type="navigate">
      <view class="smart-panel-title"><text>新闻页面</text></view>
    </navigator>
    <navigator url="/pages/IntentPage/IntentPage" open-type="navigate">
      <view class="smart-panel-title"><text>组件传值</text></view>
    </navigator>
  </view>
</template>

<script>
  export default {
    data() {
      return {};
    },
    methods: {
      // 合并优化后的跳转方法
      goDetailPage(e, prefix = '') {
        let baseUrl = '/pages/' + (prefix ? prefix + '/' : '');
        if (typeof e === 'string') {
          uni.navigateTo({
            url: baseUrl + e,
          });
        } else {
          uni.navigateTo({
            url: e.url
          });
        }
      }
    }
  };
</script>

<style>
  .smart-panel-title {
    padding: 15rpx;
    margin: 10rpx 0;
    border: 1px solid #eee;
  }
</style>